package com.it.shiro.utils;

import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * ClassName:MyException
 * Package:com.it.shiro.utils
 * Description: 描述信息
 *
 * @date:2022/3/31 11:36
 * @author:动力节点
 */

@RestControllerAdvice
public class MyException extends RuntimeException{

    @ExceptionHandler(AuthorizationException.class)
    public Object ShiroException(){
        return "请先获取对应资源，在进行访问";
    }
}
